﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.AcquisitionContext;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.AcquisitionContext
{
    /// <summary>
    /// 采集规则仓储接口
    /// </summary>
    public interface IAcquisitionRuleRepository : IAggRootRepository<AcquisitionRule>
    {
        #region # 分页获取采集规则列表 —— ICollection<AcquisitionRule> FindByPage(string keywords...
        /// <summary>
        /// 分页获取采集规则列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="processId">工艺Id</param>
        /// <param name="processSegmentId">工艺段Id</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>采集规则列表</returns>
        ICollection<AcquisitionRule> FindByPage(string keywords, Guid? processId, Guid? processSegmentId, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion

        #region # 获取工艺段相关采集规则 —— AcquisitionRule SingleByProcessSegment(Guid processSegmentId)
        /// <summary>
        /// 获取工艺段相关采集规则
        /// </summary>
        /// <param name="processSegmentId">工艺段Id</param>
        /// <returns>采集规则</returns>
        AcquisitionRule SingleByProcessSegment(Guid processSegmentId);
        #endregion

        #region # 是否存在工艺段相关采集规则 —— bool ExistsByProcessSegment(Guid processSegmentId)
        /// <summary>
        /// 是否存在工艺段相关采集规则
        /// </summary>
        /// <param name="processSegmentId">工艺段Id</param>
        /// <returns>是否存在</returns>
        bool ExistsByProcessSegment(Guid processSegmentId);
        #endregion
    }
}
